<?xml version="1.0" encoding="UTF-8" ?>

<!-- One XSLT that use HTML + CSS to display all the relevant information about the games of a specific week, 
with a parameter that identify the requested week. -->

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html" indent="yes"/>
	
    <xsl:param name="query"/>
	<xsl:param name="type">html</xsl:param>
	
	<xsl:template match="/">
			 
		<html>
			<head>
								<title>XpertStats XML - Tabela Classificativa</title>
								<link href="css/bluedream.css" media="screen" rel="stylesheet" type="text/css" />
								<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
								<link rel="shortcut icon" href="images/logo.ico" />
								<link rel="icon" type="image/gif" href="images/logo.ico" />
								<script type="text/javascript"> 
											var query = '<xsl:value-of select="$query"/>';
											var xslFile = "xslt/fixture_page.xslt";
											var xmlFile = "fixture_data.xml"
								</script>
								<script type="text/javascript" src="js/XSLT-sort.js"/> 
			
							</head>
			<body>
				<div id="wrapper">
					<div id="header">
						<div id="header_content">
							<img src="./images/logo.png"/>
							<div style="float:right; margin-top: 15px;">
								<form name="form" id="searchbox">
									<select id="steam" onchange="javascript:queryGo(document.getElementById('steam').options[document.getElementById('steam').selectedIndex].value)">
					<xsl:for-each select="/league_fixtures/fixture">
										<option>
											<xsl:attribute name="value"><xsl:value-of select="@id" /></xsl:attribute>
											Week <xsl:value-of select="substring-after(@id,'fixtures_')"/>
										</option>
					</xsl:for-each>					
						
									</select>
				                    <input type="button" value="Go" onclick="javascript:queryGo(document.getElementById('steam').options[document.getElementById('steam').selectedIndex].value)"/>
								</form>
							</div>			
					
						</div>
					</div>  
					<div id="menuStrip">
						<ul class="menu">
							  <li><a href="stadiums_data.xml"><span>Stadiums</span></a></li>
							  <li><a href="teams_data.xml"><span>Teams</span></a></li>
							  <li><a href="players_data.xml"><span>Players</span></a></li>
							  <li><a href="fixtures_data.xml"  class="active"><span>Fixtures</span></a></li>
						</ul>    
					</div>

					<div id="main" style="padding-top: 10px;">   
						<h2>Played fixtures</h2>
						<ul>
						<xsl:for-each select="league_fixtures/fixture">
							<li style="padding:5px">
								<a href="javascript:viewFixture('{@id}')">Week <xsl:value-of select="substring-after(@id,'fixtures_')"/></a>
							</li>
						</xsl:for-each>
						</ul>
					</div>
				</div>
				<div id="footer">
					<div id="footerD">
						<div id="footerF" class="aligned">XpertStats XML - Desenvolvido no âmbito da cadeira CTXML 2011 @ FCT-UNL</div>
						<div id="footerS" class="aligned">Por: Ricardo Mestre e Nuno Gomes</div>
					</div>
				</div>    
			</body>
		</html>
		
	</xsl:template>

	

</xsl:stylesheet>

